﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace StockPredictor.Models
{
    /// <summary>
    /// Abstract stock information using yahoo finance 
    /// </summary>
    public abstract class StockModel
    {
        public string Name { get; set; }
        public string Symbol { get; set; }
        public DateTime TradeDate { get; set; }
        public double Open { get; set; }
        public double High { get; set; }
        public double Low { get; set; }
        public double Volume { get; set; }
        public double EPS { get; set; }
        public Boolean InUserPortfolio { get; set; }

        public override string ToString()
        {
            return Name + ", " + Symbol + " $" + Open + " - " + TradeDate;
        }
    }
    
    /// <summary>
    /// Current stock model
    /// </summary>
    public class CurrentStock : StockModel
    {
        // current yahoo finance data record
        public double PreviousClose { get; set; }
        public double PERatio { get; set; }        
        public double Bid { get; set; }
        public double Ask { get; set; }
        public string Change { get; set; }
    }

    /// <summary>
    /// Historical stock model
    /// </summary>
    public class HistoricalStock: StockModel
    {
        // historical yahoo finance data record
        public double Close { get; set; }
        public double Adj_Close { get; set; }
    }
}